package com.wuliu.system.domain.dto.applet;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author realue
 * @version 1.0
 * @date 2023-11-04 15:14
 */
@Data
@ApiModel(description = "创建行车记录实体类")
public class TspDrivingRecordDto {

    @ApiModelProperty(value = "id 编辑必填")
    private String id;

    @NotBlank(message = "项目类型不能为空")
    @ApiModelProperty(value = "项目类型",required = true)
    private String projType;

    @NotBlank(message = "车次不能为空")
    @ApiModelProperty(value = "车次",required = true)
    private String trainNum;

    @NotBlank(message = "班次不能为空")
    @ApiModelProperty(value = "班次",required = true)
    private String classNum;

    @NotBlank(message = "日期不能为空")
    @ApiModelProperty(value = "日期",required = true)
    private String drivingDate;

    @ApiModelProperty(value = "司机id bas_employee->id")
    private String driverId;

    @ApiModelProperty(value = "司机编号")
    private String driverNo;

    @NotBlank(message = "司机姓名不能为空")
    @ApiModelProperty(value = "司机姓名",required = true)
    private String driverName;

    @NotBlank(message = "司机电话")
    @ApiModelProperty(value = "司机电话",required = true)
    private String driverMobile;

    @NotBlank(message = "车牌号不能为空")
    @ApiModelProperty(value = "车牌号",required = true)
    private String vehicelNumber;

    @NotBlank(message = "车型不能为空")
    @ApiModelProperty(value = "车型 4.2M、7.6M、9.6M",required = true)
    private String vehicelType;

    @NotBlank(message = "发车时间不能为空")
    @ApiModelProperty(value = "发车时间",required = true)
    private String departureTime;

    @NotBlank(message = "到达时间不能为空")
    @ApiModelProperty(value = "到达时间",required = true)
    private String arrivalTime;

    @ApiModelProperty(value = "配送类型 无物资退货、不拉物资退货、拉本车物资退货、帮其他车拉物资退货")
    private String[] deliveryType;

    @ApiModelProperty(value = "重量")
    private BigDecimal weight;

    @ApiModelProperty(value = "件数")
    private Integer cargoCnt;

    @ApiModelProperty(value = "体积")
    private BigDecimal volume;

    @NotNull(message = "发车公里数不能为空")
    @ApiModelProperty(value = "发车公里数",required = true)
    private BigDecimal departureKilo;

    @NotNull(message = "收车公里数不能为空")
    @ApiModelProperty(value = "收车公里数",required = true)
    private BigDecimal arrivalKilo;

    @ApiModelProperty(value = "加油/升")
    private BigDecimal addOil;

    @ApiModelProperty(value = "加油金额/元")
    private BigDecimal addOilFee;

    @ApiModelProperty(value = "高速费")
    private BigDecimal expresswayFee;

    @ApiModelProperty(value = "尿素费")
    private BigDecimal ureaFee;

    @ApiModelProperty(value = "其它费")
    private BigDecimal otherFee;

    @ApiModelProperty(value = "途径站点id列表")
    private List<Long> deptIds;

    @ApiModelProperty(value = "图片列表")
    private List<Image> images;

    @ApiModelProperty(value = "备注")
    private String remark;

    @Data
    @Valid
    public static class Image{
        @ApiModelProperty(value = "类型 11.货物图片 12.车辆(车牌)图片 13.发车公里数图片 14.收车公里数图片 14.加油图片 15.高速费图片")
        private Integer type;

        @NotBlank(message = "图片链接不能为空")
        @ApiModelProperty(value = "图片链接")
        private String image;
    }
}
